<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserOilcardTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_oilcard', function (Blueprint $table) {
            $table->increments('id');
            $table->integer("user_id")->default(0)->comment("用户ID");
            $table->string("card_no",30)->default('')->comment("油卡卡号");
            $table->string("mobile",20)->default('')->comment("手机号");
            $table->tinyInteger("type")->default(0)->comment("油卡类型 1中石化，2中石油");
            $table->string("name",50)->default('')->comment("持卡人姓名");
            $table->integer("oilcard_id")->default(0)->comment("油卡ID");
            $table->integer("is_deleted")->default(0)->comment("是否删除");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_oilcard');
    }
}
